﻿using System;

namespace _14_可变个数的方法参数
{
    class Program
    {
        static void Main(string[] args)
        {
            Sample(1, 2, 3, 4, 5);
            Sample(8, 9);
        }

        static void Sample(params int[] numbers)
        {
            Console.WriteLine("\n参数列表：");
            foreach (int i in numbers)
            {
                Console.Write("{0}", i);
            }
            Console.WriteLine();
        }
    }
}
